package com.itheima.fujiati;

import java.util.Scanner;

public class replace {
    public static void dm(String str){
        String[] s = {"sb","Sb","sB","SB","tmd","Tmd","tMd","tmD","TMd","tMD","TmD","TMD","傻蛋","sha蛋","傻 dan","傻逼"};
        for (int i = 0; i < s.length; i++) {
            String s1 = s[i];//拿到单个敏感词
            if(str.contains(s1)){//如果传入的词包含敏感词就替换,替换的再赋值给传入的词
                str = str.replace(s[i],"**");
            }

        }
        System.out.println(str);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一句话:");
        String st = sc.nextLine();
        dm(st);
    }
}
